//
//  UIButton+Extension.swift
//  weibo
//
//  Created by uncle-R on 15/12/21.
//  Copyright © 2015年 uncle-R. All rights reserved.
//

import UIKit

extension UIButton {
//按钮便利构造函数.
    
    
    convenience init(imageName: String,fonSize: CGFloat, title: String){
        self.init()
        
        //设置图片
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        
        setTitleColor(UIColor.lightGrayColor(), forState: UIControlState.Normal)
        
        titleLabel?.font = UIFont.systemFontOfSize(fonSize)
        
        setTitle(title, forState: UIControlState.Normal)
        
        
    }
    
    
}
